﻿#define _CRT_SECURE_NO_WARNINGS/*(阶乘求和；3！2！1！)*/
#include<stdio.h>
int main()
{/*
	int i, sum = 0, ret = 1, j, n;
	scanf("%d", &n);
	for (i = 1; i <= n; i++)
	{
		ret = 1;
		for (int j = 1; j <= i; j++)
		{
			ret = ret * j;
		}

		sum = sum + ret;
	}


	printf("%d", sum);*/

	int n, ret = 1, sum = 0;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		ret = ret * i;
		sum = sum + ret;
	}
	printf("%d", sum);

	return 0;
}